﻿Imports System.Collections.Generic

Namespace Model

    Public Class User
        Implements IEquatable(Of User)

        Public Property UserId As Integer
        Public Property UserName As String
        Public Property Department As Department

        Overloads Function Equals(ByVal otherUser As User) As Boolean _
            Implements IEquatable(Of User).Equals

            If Me.UserId = otherUser.UserId _
                And Me.UserName = otherUser.UserName _
                And Me.Department.Equals(otherUser.Department) _
            Then
                Return True
            End If

            Return False

        End Function

    End Class

End Namespace
